const getItem = (name: string) => {
    let data: any = window.localStorage.getItem(name);
    try {
        return JSON.parse(data);
    } catch (err) {
        return data;
    }
};
const setItem = (name: string, value: any) => {
    if (typeof value === "object") {
        value = JSON.stringify(value);
    }
    window.localStorage.setItem(name, value);
};
const removeItem = (name: string) => {
    window.localStorage.removeItem(name);
};
export { removeItem, setItem, getItem };
